Skip to content

feat: add tool annotations according to 2025-03-26 spec #71

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

SeanChinJunKai
Copy link
Contributor

Motivation and Context

Add tool annotations to provide additional properties describing a Tool to clients.

How Has This Been Tested?

NA

Breaking Changes

NA

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

References:
https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/schema/2025-03-26/schema.ts#L737

@e5l e5l requested review from e5l and Copilot April 9, 2025 18:46
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

src/jvmTest/kotlin/client/ClientTest.kt:526

  • Consider adding a test case with non-null annotations to validate the behavior when actual annotation data is provided.
annotations = null,

src/commonTest/kotlin/ToolSerializationTest.kt:36

  • Consider including a test scenario for serializing/deserializing a Tool with non-null annotations to ensure full coverage of the new feature.
annotations = null,

Copy link
Contributor

@e5l e5l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, would be nice to have a sample as well

@e5l e5l enabled auto-merge (squash) April 10, 2025 08:21
@SeanChinJunKai
Copy link
Contributor Author

Hi @e5l, Ill look into it. Thanks for the feedback!

@SeanChinJunKai
Copy link
Contributor Author

Hi @e5l, shall i add it in the weather server sample?

@e5l
Copy link
Contributor

e5l commented Apr 17, 2025

yep, it would be great?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants